from rest_framework.permissions import BasePermission


class MyPermission(BasePermission):
    message = {"code": 1001, "msg": "无权访问"}  # 自定义错误信息

    def has_permission(self, request, view):
        return True
